package com.example.demo.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * Created by liujiahao on 2019/4/19.
 */
@Service
public class RedisServiceImpl implements RedisService{
    @Autowired
    JedisPool jedisPool;
    @Override
    public  Object save() {
        Jedis jedis=jedisPool.getResource();
        jedis.set("ljh","33333");
        return null;
    }

    @Override
    public Object get() {
        return null;
    }
}
